package design.principles.ocp;

public class JavaCource implements ICourse{
    private Integer Id;
    private String name;
    private Double price;

    public JavaCource(Integer id, String name, Double price) {
        this.Id = id;
        this.name = name;
        this.price = price;
    }

    @Override
    public Integer getId() {
        return Id;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public Double getPrice() {
        return price;
    }

    @Override
    public String toString() {
        return "Java课程：" +
                "\n编号：" + Id +
                "\n课程名：" + name  +
                "\n价格：" + price;
    }
}
